{wc:templates "index","header"}
<div class="main-content clearfix">
{wc:templates "member","left"}
<link rel="stylesheet" type="text/css" href="{G_TEMPLATES_STYLE}/css/layout-setUp.css"/>
<link href="{G_TEMPLATES_STYLE}/js/style.css" rel="stylesheet" type="text/css" />
<link href="{G_TEMPLATES_STYLE}/js/demo.css" rel="stylesheet" type="text/css" />
<link href="{G_TEMPLATES_STYLE}/css/msg.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="{G_TEMPLATES_STYLE}/js/jquery.Validform.min.js"></script>
<script type="text/javascript">
$(function(){		
	var demo=$(".tel_verification").Validform({
		tiptype:3,		
	});
})
</script>
<div class="R-content">
	<div class="member-t"><h2>私信聊天</h2><a href="javascript:history.go(-1);" class="blue">&lt;&lt; 返回</a></div>
	<div class="tel_verification">
		<div class="fri-msg-wrap">
			 
		 <div class="fri-pri-info">
			  <p class="warn">系统提醒：1元云购不会以私信方式向云友索取任何相关信息，以防诈骗。</p>
			  <div class="mine clrfix">
				<a href="javascript:;" target="_blank" class="h-pic">
				  <img src="{wc:$thisimg}" width="50" height="50"></a>
				<div class="info-tail text-wrap">
				  <div class="ke-container ke-container-simple" style="width: 580px;">
					<div style="display: block; height: 125px;" id="content" contenteditable="true" class="ke-edit"></div>
					<div class=" ke-toolbar">
					  <div class="Comment_but">
						<a id="btnSubmitMsgsss" href="javascript:void(0);" class="ke-toolbar-icon ke-toolbar-icon-url ke-icon-emoticons"> </a></div>
					</div>
					<input type="hidden" id="id" value="{wc:$id}">
					<div class="Comment_button">
					  <div class="Comment_but">
						<a id="btnSubmitMsg" href="javascript:void(0);" class="reply_unbotton disBtn">立即发送</a></div>
					</div>
				  </div>
				  <b>
					<b>
					</b>
				  </b>
				  <input type="button" id="btnPostMsg" class="hidden"></div>
			  </div>
			  <ul id="ul_msglist">
				{wc:loop $lists $rt}
				<li class="{wc:if $rt['uid']==$uid} mine {wc:else}other {wc:if:end}clrfix">
				  <a href="javascript:;" target="_blank" class="h-pic">
					<img src="{wc:$rt['img']}" width="50" height="50"></a>
				  <div class="info-tail">
					<p>
					  <a href="javascript:;" target="_blank" class="blue">{wc:$rt['obj']}</a>：
					  <span>{wc:$rt['text']}</span></p>
					<span class="gray9">{wc:$rt['add_time']}</span>
					<b>
					  <b>
					  </b>
					</b>
					<a href="javascript:;" oppuserid="15745539" msgid="1462857" class="close-btn" style="display: none;">
					  <span></span>
					</a>
				  </div>
				</li>
				{wc:loop:end}

				
			  </ul>
			</div>
					
					
					
					
					
					
					
					
					
					
		  
		  
		</div>		
	</div>
</div>
		
</div>

 
<link href="{G_TEMPLATES_STYLE}/css/emoji/lib/css/jquery.mCustomScrollbar.min.css" rel="stylesheet" type="text/css" />
<link href="{G_TEMPLATES_STYLE}/css/emoji/dist/css/jquery.emoji.css" rel="stylesheet" type="text/css" />


<script>
$(document).ready(function(){

	$("#content").emoji({
		button: "#btnSubmitMsgsss",
		showTab: false,
		animation: 'slide',
		icons: [{
			name: "QQ表情",
			path: "{G_TEMPLATES_STYLE}/css/emoji/dist/img/qq/",
			maxNum: 91,
			excludeNums: [41, 45, 54],
			file: ".gif"
		}]
	});
	
	
	$('#btnSubmitMsg').click(function(){
		var id = $('#id').val();
		var content = $('#content').html();
		if(!id){
			alert('系统异常');return false;
		}
		if(!content){ alert('请输入聊天内容');return false;}
		
		var str = encodeURI(ajax_encode(content));
		$.getJSON('{WEB_PATH}/member/home/ajax_huifu/txt/'+str+'/uid/'+id,function(data){
			if(data.error > 0){
				alert(data.msg);
				return false;
			}else{
				alert(data.msg); 
				window.location.reload();
			}
		});
		
	});
});
function ajax_encode(str)
{
    str = str.replace(/%/g,"wkbai");
    str = str.replace(/ /g,"wkkong");
    str = str.replace(/</g,"wkzuojian");
    str = str.replace(/>/g,"wkyoujian");
    str = str.replace(/&/g,"wkand");
    str = str.replace(/\"/g,"wkshuang");
    str = str.replace(/\'/g,"wkdan");
    str = str.replace(/\t/g,"wktab");
    str = str.replace(/\+/g,"wkjia");
    str = str.replace(/\//g,"wkdangang");
    str = str.replace(/\:/g,"wkmaohao");
    str = str.replace(/\=/g,"wkdengyu");
    return str;
}
</script>



<script src="{G_TEMPLATES_STYLE}/css/emoji/lib/script/highlight.pack.js"></script>
<script src="{G_TEMPLATES_STYLE}/css/emoji/lib/script/jquery.mousewheel-3.0.6.min.js"></script>
<script src="{G_TEMPLATES_STYLE}/css/emoji/lib/script/jquery.mCustomScrollbar.min.js"></script>
<script src="{G_TEMPLATES_STYLE}/css/emoji/dist/js/jquery.emoji.min.js"></script>





{wc:templates "index","footer"}